#ifndef HTTPDOWNLOADFILE_H
#define HTTPDOWNLOADFILE_H
#include <QNetworkAccessManager>
#include <QNetworkReply>
#include <QNetworkRequest>
#include <QFile>

#include <QWidget>

namespace Ui {
class HttpDownloadFile;
}

class HttpDownloadFile : public QWidget
{
    Q_OBJECT

public:
    explicit HttpDownloadFile(QWidget *parent = 0);
    ~HttpDownloadFile();

private slots:
    void on_pushButton_clicked();

    void read_data();
    void down_progress(quint64 recvsize, quint64 allsize);
private:
    Ui::HttpDownloadFile *ui;
    QNetworkAccessManager manager;
    QNetworkReply *reply;
    QFile file;
};

#endif // HTTPDOWNLOADFILE_H
